﻿cmake_minimum_required(VERSION 3.16)

project(CameraTUCAM VERSION 2.0.0 LANGUAGES CXX)

set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core Widgets LinguistTools Multimedia)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Widgets LinguistTools Multimedia)

set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/..)

find_package(TUCAM_API REQUIRED)
add_library(CameraTUCAM MODULE
    ../Camera_global.h
    CameraTUCAM.h
    CameraTUCAM.cpp
    CameraTUCAM_private.h
    CameraTUCAM_private.cpp
    ../CameraCommon/IndustryCamera.h
    ../CameraCommon/DialogCameraSetup.h
    CameraTUCAMImageProcessing.h
    CameraTUCAMImageProcessing.cpp
    CameraFactory.h
    CameraFactory.cpp
    ImageThread.cpp
    ImageThread.h
)

target_link_libraries(CameraTUCAM PUBLIC ${TUCAM_API_LIBRARIES})
target_link_libraries(CameraTUCAM PUBLIC Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Multimedia CameraCommon)
target_include_directories(CameraTUCAM PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_compile_definitions(CameraTUCAM PRIVATE CAMERA_LIBRARY)


